import { PanelType } from "../shared";
import { ToolPanel } from "../common/ToolPanel";
import * as vscode from "vscode";
import i18n from "../i18n";

export class {{className}} extends ToolPanel<{{className}}> {
  constructor(panel: vscode.WebviewPanel, extensionUri: vscode.Uri) {
    super(panel, extensionUri, PanelType.{{panelType}}, "{{lowerCase framework}}");
  }

  public static createOrShow(extensionUri: vscode.Uri) {
    super.createOrShow(
      extensionUri,
      PanelType.{{panelType}},
      i18n.t("view.devtoys.{{category}}.{{panelType}}.panel.title"),
      {{className}}
    );
  }

  public dispose(): void {
    super.dispose();
    {{className}}.currentPanel = undefined;
  }
}

ToolPanel.allPanel.add({{className}});
